<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>v-if与v-show区别练习</title>
</head>
<body>
    <div id="app">
        <!-- 绑定事件    visible=!visible 让取得的布尔值为反 -->
        <button @click="visible=!visible">按钮</button>
        <div v-if="visible">显示隐藏的div元素</div>
        <p v-show="visible">显示隐藏的元素</p>
    </div>

    <script src="./lib/vue.js"></script>
    <script>
    new Vue({
        el:'#app',
        data:{
            visible:false
        }
    })
    
    
    
    </script>
</body>
</html>